package com.codrim.cs.data.server.rpc.report;

import com.codrim.cs.data.rpc.dto.param.StatisticDataDTO;
import com.codrim.cs.data.server.dao.entity.StatCsAffAllDO;

/**
 * @author Liang.Zhuge on 14/08/2017.
 */
public class StatCsAffAllHelper extends AbstractStatDataHelper<StatCsAffAllDO> {

    @Override
    GroupKey[] groupKeys() {
        return new GroupKey[]{GroupKey.AffiliateId, GroupKey.Symbol};
    }

    @Override
    protected StatCsAffAllDO initKeyFields(int sdate, StatisticDataDTO dto) {
        StatCsAffAllDO affAll = new StatCsAffAllDO();
        affAll.setSdate(sdate);
        affAll.setSymbol(dto.getCurrencySymbol());
        affAll.setAffiliateId(dto.getAffId());
        return affAll;
    }

}
